//动态的生成一个年 的list
package bupt.party.online.vo;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import bupt.party.online.util.BuptPartyConfig;
import bupt.party.online.util.Data;


public class Year {
	
	private  List<Data> collection = new ArrayList<Data>();
	
	public List<Data> getCollection() {
		return collection;
	}
	
	public Year() {
		
		Timestamp  t = new Timestamp(System.currentTimeMillis());
		String date = t.toString();
		String year = BuptPartyConfig.subString(date, 4);//截取四位的年份
		int currentYear = Integer.parseInt(year);
		
		//获取最近的十年
		for(int i=0;i<10;i++){
			year = (currentYear-i)+"";
			collection.add(new Data(year, year));
		}
	}
	
}
